load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "aes_gcm_key_manager",
    srcs = ["AesGcmKeyManager.java"],
    deps = [
        ":aes_gcm_key",
        ":aes_gcm_parameters",
        ":aes_gcm_proto_serialization",
        ":predefined_aead_parameters",
        "//proto:aes_gcm_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aes_gcm_siv_key_manager",
    srcs = ["AesGcmSivKeyManager.java"],
    deps = [
        ":aes_gcm_siv_key",
        ":aes_gcm_siv_parameters",
        ":aes_gcm_siv_proto_serialization",
        "//proto:aes_gcm_siv_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/aead/subtle:aes_gcm_siv",
        "//src/main/java/com/google/crypto/tink/internal:legacy_key_manager_impl",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_creation_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

java_library(
    name = "aead_key_templates",
    srcs = ["AeadKeyTemplates.java"],
    deps = [
        ":aes_ctr_hmac_aead_key_manager",
        ":aes_eax_key_manager",
        ":aes_gcm_key_manager",
        ":cha_cha20_poly1305_key_manager",
        ":kms_aead_key_manager",
        ":kms_envelope_aead_key_manager",
        ":x_cha_cha20_poly1305_key_manager",
        "//proto:aes_ctr_hmac_aead_java_proto",
        "//proto:aes_ctr_java_proto",
        "//proto:aes_eax_java_proto",
        "//proto:aes_gcm_java_proto",
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:kms_aead_java_proto",
        "//proto:kms_envelope_java_proto",
        "//proto:tink_java_proto",
    ],
)

java_library(
    name = "aes_ctr_hmac_aead_key_manager",
    srcs = ["AesCtrHmacAeadKeyManager.java"],
    deps = [
        ":aes_ctr_hmac_aead_key",
        ":aes_ctr_hmac_aead_parameters",
        ":aes_ctr_hmac_aead_proto_serialization",
        ":predefined_aead_parameters",
        "//proto:aes_ctr_hmac_aead_java_proto",
        "//proto:aes_ctr_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key_manager",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aead_factory",
    srcs = ["AeadFactory.java"],
    deps = [
        ":aead_wrapper",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
    ],
)

java_library(
    name = "kms_aead_key_manager",
    srcs = ["KmsAeadKeyManager.java"],
    deps = [
        ":legacy_kms_aead_parameters",
        ":legacy_kms_aead_proto_serialization",
        "//proto:kms_aead_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:kms_client",
        "//src/main/java/com/google/crypto/tink:kms_clients",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "kms_envelope_aead",
    srcs = ["KmsEnvelopeAead.java"],
    deps = [
        ":aead_parameters",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_key_manager",
    srcs = ["XChaCha20Poly1305KeyManager.java"],
    deps = [
        ":x_cha_cha20_poly1305_key",
        ":x_cha_cha20_poly1305_parameters",
        ":x_cha_cha20_poly1305_proto_serialization",
        "//proto:tink_java_proto",
        "//proto:xchacha20_poly1305_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "//src/main/java/com/google/crypto/tink/subtle:x_cha_cha20_poly1305",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aead_wrapper",
    srcs = ["AeadWrapper.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink:primitive_set",
        "//src/main/java/com/google/crypto/tink:primitive_wrapper",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/internal:monitoring_util",
        "//src/main/java/com/google/crypto/tink/internal:mutable_monitoring_registry",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_client",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_keyset_info",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
    ],
)

java_library(
    name = "kms_envelope_aead_key_manager",
    srcs = ["KmsEnvelopeAeadKeyManager.java"],
    deps = [
        ":aead_parameters",
        ":aes_ctr_hmac_aead_parameters",
        ":aes_eax_parameters",
        ":aes_gcm_parameters",
        ":aes_gcm_siv_parameters",
        ":cha_cha20_poly1305_parameters",
        ":kms_envelope_aead",
        ":legacy_kms_envelope_aead_parameters",
        ":legacy_kms_envelope_aead_proto_serialization",
        ":x_cha_cha20_poly1305_parameters",
        "//proto:kms_envelope_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:kms_client",
        "//src/main/java/com/google/crypto/tink:kms_clients",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_template_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "cha_cha20_poly1305_key_manager",
    srcs = ["ChaCha20Poly1305KeyManager.java"],
    deps = [
        ":cha_cha20_poly1305_key",
        ":cha_cha20_poly1305_parameters",
        ":cha_cha20_poly1305_proto_serialization",
        "//proto:chacha20_poly1305_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/subtle:cha_cha20_poly1305",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aes_eax_key_manager",
    srcs = ["AesEaxKeyManager.java"],
    deps = [
        ":aes_eax_key",
        ":aes_eax_parameters",
        ":aes_eax_proto_serialization",
        ":predefined_aead_parameters",
        "//proto:aes_eax_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/subtle:aes_eax_jce",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aead_config",
    srcs = ["AeadConfig.java"],
    deps = [
        ":aead_wrapper",
        ":aes_ctr_hmac_aead_key_manager",
        ":aes_eax_key_manager",
        ":aes_gcm_key_manager",
        ":aes_gcm_siv_key_manager",
        ":cha_cha20_poly1305_key_manager",
        ":kms_aead_key_manager",
        ":kms_envelope_aead_key_manager",
        ":x_cha_cha20_poly1305_key_manager",
        "//proto:config_java_proto",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
    ],
)

java_library(
    name = "aead_key",
    srcs = ["AeadKey.java"],
    deps = [
        ":aead_parameters",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

java_library(
    name = "aead_parameters",
    srcs = ["AeadParameters.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:parameters",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_eax_parameters",
    srcs = ["AesEaxParameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_eax_key",
    srcs = ["AesEaxKey.java"],
    deps = [
        ":aead_key",
        ":aes_eax_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/annotations:alpha",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_eax_proto_serialization",
    srcs = ["AesEaxProtoSerialization.java"],
    deps = [
        ":aes_eax_key",
        ":aes_eax_parameters",
        "//proto:aes_eax_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aes_gcm_parameters",
    srcs = ["AesGcmParameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_gcm_key",
    srcs = ["AesGcmKey.java"],
    deps = [
        ":aead_key",
        ":aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/annotations:alpha",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_gcm_siv_parameters",
    srcs = ["AesGcmSivParameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_gcm_siv_key",
    srcs = ["AesGcmSivKey.java"],
    deps = [
        ":aead_key",
        ":aes_gcm_siv_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/annotations:alpha",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_gcm_proto_serialization",
    srcs = ["AesGcmProtoSerialization.java"],
    deps = [
        ":aes_gcm_key",
        ":aes_gcm_parameters",
        "//proto:aes_gcm_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "aes_gcm_siv_proto_serialization",
    srcs = ["AesGcmSivProtoSerialization.java"],
    deps = [
        ":aes_gcm_siv_key",
        ":aes_gcm_siv_parameters",
        "//proto:aes_gcm_siv_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

# Android libraries

android_library(
    name = "aes_gcm_key_manager-android",
    srcs = ["AesGcmKeyManager.java"],
    deps = [
        ":aes_gcm_key-android",
        ":aes_gcm_parameters-android",
        ":aes_gcm_proto_serialization-android",
        ":predefined_aead_parameters-android",
        "//proto:aes_gcm_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_gcm_siv_key_manager-android",
    srcs = ["AesGcmSivKeyManager.java"],
    deps = [
        ":aes_gcm_siv_key-android",
        ":aes_gcm_siv_parameters-android",
        ":aes_gcm_siv_proto_serialization-android",
        "//proto:aes_gcm_siv_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_manager-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/aead/subtle:aes_gcm_siv-android",
        "//src/main/java/com/google/crypto/tink/internal:legacy_key_manager_impl-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_creation_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

android_library(
    name = "aead_key_templates-android",
    srcs = ["AeadKeyTemplates.java"],
    deps = [
        ":aes_ctr_hmac_aead_key_manager-android",
        ":aes_eax_key_manager-android",
        ":aes_gcm_key_manager-android",
        ":cha_cha20_poly1305_key_manager-android",
        ":kms_aead_key_manager-android",
        ":kms_envelope_aead_key_manager-android",
        ":x_cha_cha20_poly1305_key_manager-android",
        "//proto:aes_ctr_hmac_aead_java_proto_lite",
        "//proto:aes_ctr_java_proto_lite",
        "//proto:aes_eax_java_proto_lite",
        "//proto:aes_gcm_java_proto_lite",
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:kms_aead_java_proto_lite",
        "//proto:kms_envelope_java_proto_lite",
        "//proto:tink_java_proto_lite",
    ],
)

android_library(
    name = "aes_ctr_hmac_aead_key_manager-android",
    srcs = ["AesCtrHmacAeadKeyManager.java"],
    deps = [
        ":aes_ctr_hmac_aead_key-android",
        ":aes_ctr_hmac_aead_parameters-android",
        ":aes_ctr_hmac_aead_proto_serialization-android",
        ":predefined_aead_parameters-android",
        "//proto:aes_ctr_hmac_aead_java_proto_lite",
        "//proto:aes_ctr_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:mac-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key_manager-android",
        "//src/main/java/com/google/crypto/tink/subtle:aes_ctr_jce_cipher-android",
        "//src/main/java/com/google/crypto/tink/subtle:encrypt_then_authenticate-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aead_factory-android",
    srcs = ["AeadFactory.java"],
    deps = [
        ":aead_wrapper-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:registry_cluster-android",
    ],
)

android_library(
    name = "kms_aead_key_manager-android",
    srcs = ["KmsAeadKeyManager.java"],
    deps = [
        ":legacy_kms_aead_parameters-android",
        ":legacy_kms_aead_proto_serialization-android",
        "//proto:kms_aead_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:kms_client-android",
        "//src/main/java/com/google/crypto/tink:kms_clients-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "kms_envelope_aead-android",
    srcs = ["KmsEnvelopeAead.java"],
    deps = [
        ":aead_parameters-android",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_key_manager-android",
    srcs = ["XChaCha20Poly1305KeyManager.java"],
    deps = [
        ":x_cha_cha20_poly1305_key-android",
        ":x_cha_cha20_poly1305_parameters-android",
        ":x_cha_cha20_poly1305_proto_serialization-android",
        "//proto:tink_java_proto_lite",
        "//proto:xchacha20_poly1305_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_key_derivation_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "//src/main/java/com/google/crypto/tink/subtle:x_cha_cha20_poly1305-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aead_wrapper-android",
    srcs = ["AeadWrapper.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:crypto_format-android",
        "//src/main/java/com/google/crypto/tink:primitive_set-android",
        "//src/main/java/com/google/crypto/tink:primitive_wrapper-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/internal:monitoring_util-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_monitoring_registry-android",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_client-android",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_keyset_info-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
    ],
)

android_library(
    name = "kms_envelope_aead_key_manager-android",
    srcs = ["KmsEnvelopeAeadKeyManager.java"],
    deps = [
        ":aead_parameters-android",
        ":aes_ctr_hmac_aead_parameters-android",
        ":aes_eax_parameters-android",
        ":aes_gcm_parameters-android",
        ":aes_gcm_siv_parameters-android",
        ":cha_cha20_poly1305_parameters-android",
        ":kms_envelope_aead-android",
        ":legacy_kms_envelope_aead_parameters-android",
        ":legacy_kms_envelope_aead_proto_serialization-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//proto:kms_envelope_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:kms_client-android",
        "//src/main/java/com/google/crypto/tink:kms_clients-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_template_proto_converter-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "cha_cha20_poly1305_key_manager-android",
    srcs = ["ChaCha20Poly1305KeyManager.java"],
    deps = [
        ":cha_cha20_poly1305_key-android",
        ":cha_cha20_poly1305_parameters-android",
        ":cha_cha20_poly1305_proto_serialization-android",
        "//proto:chacha20_poly1305_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/subtle:cha_cha20_poly1305-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_eax_key_manager-android",
    srcs = ["AesEaxKeyManager.java"],
    deps = [
        ":aes_eax_key-android",
        ":aes_eax_parameters-android",
        ":aes_eax_proto_serialization-android",
        ":predefined_aead_parameters-android",
        "//proto:aes_eax_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:aead-android",
        "//src/main/java/com/google/crypto/tink:key_template-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
        "//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/subtle:aes_eax_jce-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aead_config-android",
    srcs = ["AeadConfig.java"],
    deps = [
        ":aead_wrapper-android",
        ":aes_ctr_hmac_aead_key_manager-android",
        ":aes_eax_key_manager-android",
        ":aes_gcm_key_manager-android",
        ":aes_gcm_siv_key_manager-android",
        ":cha_cha20_poly1305_key_manager-android",
        ":kms_aead_key_manager-android",
        ":kms_envelope_aead_key_manager-android",
        ":x_cha_cha20_poly1305_key_manager-android",
        "//proto:config_java_proto_lite",
        "//src/main/java/com/google/crypto/tink/config:tink_fips-android",
        "//src/main/java/com/google/crypto/tink/mac:mac_config-android",
    ],
)

android_library(
    name = "aead_key-android",
    srcs = ["AeadKey.java"],
    deps = [
        ":aead_parameters-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

android_library(
    name = "aead_parameters-android",
    srcs = ["AeadParameters.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_eax_parameters-android",
    srcs = ["AesEaxParameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_eax_key-android",
    srcs = ["AesEaxKey.java"],
    deps = [
        ":aead_key-android",
        ":aes_eax_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/annotations:alpha-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_eax_proto_serialization-android",
    srcs = ["AesEaxProtoSerialization.java"],
    deps = [
        ":aes_eax_key-android",
        ":aes_eax_parameters-android",
        "//proto:aes_eax_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_gcm_parameters-android",
    srcs = ["AesGcmParameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_gcm_key-android",
    srcs = ["AesGcmKey.java"],
    deps = [
        ":aead_key-android",
        ":aes_gcm_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/annotations:alpha-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_gcm_siv_parameters-android",
    srcs = ["AesGcmSivParameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_gcm_siv_key-android",
    srcs = ["AesGcmSivKey.java"],
    deps = [
        ":aead_key-android",
        ":aes_gcm_siv_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/annotations:alpha-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_gcm_proto_serialization-android",
    srcs = ["AesGcmProtoSerialization.java"],
    deps = [
        ":aes_gcm_key-android",
        ":aes_gcm_parameters-android",
        "//proto:aes_gcm_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_gcm_siv_proto_serialization-android",
    srcs = ["AesGcmSivProtoSerialization.java"],
    deps = [
        ":aes_gcm_siv_key-android",
        ":aes_gcm_siv_parameters-android",
        "//proto:aes_gcm_siv_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "cha_cha20_poly1305_key-android",
    srcs = ["ChaCha20Poly1305Key.java"],
    deps = [
        ":aead_key-android",
        ":cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/annotations:alpha-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "cha_cha20_poly1305_parameters-android",
    srcs = ["ChaCha20Poly1305Parameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "cha_cha20_poly1305_key",
    srcs = ["ChaCha20Poly1305Key.java"],
    deps = [
        ":aead_key",
        ":cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/annotations:alpha",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "cha_cha20_poly1305_parameters",
    srcs = ["ChaCha20Poly1305Parameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_key-android",
    srcs = ["XChaCha20Poly1305Key.java"],
    deps = [
        ":aead_key-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/annotations:alpha-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_parameters-android",
    srcs = ["XChaCha20Poly1305Parameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_key",
    srcs = ["XChaCha20Poly1305Key.java"],
    deps = [
        ":aead_key",
        ":x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/annotations:alpha",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_parameters",
    srcs = ["XChaCha20Poly1305Parameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "cha_cha20_poly1305_proto_serialization-android",
    srcs = ["ChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        ":cha_cha20_poly1305_key-android",
        ":cha_cha20_poly1305_parameters-android",
        "//proto:chacha20_poly1305_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "cha_cha20_poly1305_proto_serialization",
    srcs = ["ChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        ":cha_cha20_poly1305_key",
        ":cha_cha20_poly1305_parameters",
        "//proto:chacha20_poly1305_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "x_cha_cha20_poly1305_proto_serialization",
    srcs = ["XChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        ":x_cha_cha20_poly1305_key",
        ":x_cha_cha20_poly1305_parameters",
        "//proto:tink_java_proto",
        "//proto:xchacha20_poly1305_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "x_cha_cha20_poly1305_proto_serialization-android",
    srcs = ["XChaCha20Poly1305ProtoSerialization.java"],
    deps = [
        ":x_cha_cha20_poly1305_key-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//proto:tink_java_proto_lite",
        "//proto:xchacha20_poly1305_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "aes_ctr_hmac_aead_parameters",
    srcs = ["AesCtrHmacAeadParameters.java"],
    deps = [
        ":aead_parameters",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_ctr_hmac_aead_parameters-android",
    srcs = ["AesCtrHmacAeadParameters.java"],
    deps = [
        ":aead_parameters-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_ctr_hmac_aead_key",
    srcs = ["AesCtrHmacAeadKey.java"],
    deps = [
        ":aead_key",
        ":aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "aes_ctr_hmac_aead_key-android",
    srcs = ["AesCtrHmacAeadKey.java"],
    deps = [
        ":aead_key-android",
        ":aes_ctr_hmac_aead_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "aes_ctr_hmac_aead_proto_serialization",
    srcs = ["AesCtrHmacAeadProtoSerialization.java"],
    deps = [
        ":aes_ctr_hmac_aead_key",
        ":aes_ctr_hmac_aead_parameters",
        "//proto:aes_ctr_hmac_aead_java_proto",
        "//proto:aes_ctr_java_proto",
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "aes_ctr_hmac_aead_proto_serialization-android",
    srcs = ["AesCtrHmacAeadProtoSerialization.java"],
    deps = [
        ":aes_ctr_hmac_aead_key-android",
        ":aes_ctr_hmac_aead_parameters-android",
        "//proto:aes_ctr_hmac_aead_java_proto_lite",
        "//proto:aes_ctr_java_proto_lite",
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "predefined_aead_parameters-android",
    srcs = ["PredefinedAeadParameters.java"],
    deps = [
        ":aes_ctr_hmac_aead_parameters-android",
        ":aes_eax_parameters-android",
        ":aes_gcm_parameters-android",
        ":cha_cha20_poly1305_parameters-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
    ],
)

java_library(
    name = "predefined_aead_parameters",
    srcs = ["PredefinedAeadParameters.java"],
    deps = [
        ":aes_ctr_hmac_aead_parameters",
        ":aes_eax_parameters",
        ":aes_gcm_parameters",
        ":cha_cha20_poly1305_parameters",
        ":x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
    ],
)

java_library(
    name = "legacy_kms_aead_parameters",
    srcs = ["LegacyKmsAeadParameters.java"],
    deps = [":aead_parameters"],
)

android_library(
    name = "legacy_kms_aead_parameters-android",
    srcs = ["LegacyKmsAeadParameters.java"],
    deps = [":aead_parameters-android"],
)

android_library(
    name = "legacy_kms_aead_key-android",
    srcs = ["LegacyKmsAeadKey.java"],
    deps = [
        ":aead_key-android",
        ":legacy_kms_aead_parameters-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

java_library(
    name = "legacy_kms_aead_key",
    srcs = ["LegacyKmsAeadKey.java"],
    deps = [
        ":aead_key",
        ":legacy_kms_aead_parameters",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

android_library(
    name = "legacy_kms_envelope_aead_parameters-android",
    srcs = ["LegacyKmsEnvelopeAeadParameters.java"],
    deps = [
        ":aead_parameters-android",
        ":aes_ctr_hmac_aead_parameters-android",
        ":aes_eax_parameters-android",
        ":aes_gcm_parameters-android",
        ":aes_gcm_siv_parameters-android",
        ":cha_cha20_poly1305_parameters-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "legacy_kms_envelope_aead_parameters",
    srcs = ["LegacyKmsEnvelopeAeadParameters.java"],
    deps = [
        ":aead_parameters",
        ":aes_ctr_hmac_aead_parameters",
        ":aes_eax_parameters",
        ":aes_gcm_parameters",
        ":aes_gcm_siv_parameters",
        ":cha_cha20_poly1305_parameters",
        ":x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "legacy_kms_envelope_aead_key-android",
    srcs = ["LegacyKmsEnvelopeAeadKey.java"],
    deps = [
        ":aead_key-android",
        ":legacy_kms_envelope_aead_parameters-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

java_library(
    name = "legacy_kms_envelope_aead_key",
    srcs = ["LegacyKmsEnvelopeAeadKey.java"],
    deps = [
        ":aead_key",
        ":legacy_kms_envelope_aead_parameters",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

android_library(
    name = "legacy_kms_aead_proto_serialization-android",
    srcs = ["LegacyKmsAeadProtoSerialization.java"],
    deps = [
        ":legacy_kms_aead_key-android",
        ":legacy_kms_aead_parameters-android",
        "//proto:kms_aead_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "legacy_kms_aead_proto_serialization",
    srcs = ["LegacyKmsAeadProtoSerialization.java"],
    deps = [
        ":legacy_kms_aead_key",
        ":legacy_kms_aead_parameters",
        "//proto:kms_aead_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "legacy_kms_envelope_aead_proto_serialization-android",
    srcs = ["LegacyKmsEnvelopeAeadProtoSerialization.java"],
    deps = [
        ":aead_parameters-android",
        ":aes_ctr_hmac_aead_parameters-android",
        ":aes_eax_parameters-android",
        ":aes_gcm_parameters-android",
        ":aes_gcm_siv_parameters-android",
        ":cha_cha20_poly1305_parameters-android",
        ":legacy_kms_envelope_aead_key-android",
        ":legacy_kms_envelope_aead_parameters-android",
        ":x_cha_cha20_poly1305_parameters-android",
        "//proto:kms_envelope_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "legacy_kms_envelope_aead_proto_serialization",
    srcs = ["LegacyKmsEnvelopeAeadProtoSerialization.java"],
    deps = [
        ":aead_parameters",
        ":aes_ctr_hmac_aead_parameters",
        ":aes_eax_parameters",
        ":aes_gcm_parameters",
        ":aes_gcm_siv_parameters",
        ":cha_cha20_poly1305_parameters",
        ":legacy_kms_envelope_aead_key",
        ":legacy_kms_envelope_aead_parameters",
        ":x_cha_cha20_poly1305_parameters",
        "//proto:kms_envelope_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)
